package com.donn.securitycontrolplatform.db1.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.donn.securitycontrolplatform.dangerousgood.entity.TStorage;
import com.donn.securitycontrolplatform.dangerousgood.response.StorageResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author zhenglx
 * @since 2022-06-19
 */
@Mapper
public interface TStorageMapper extends BaseMapper<TStorage> {

    List<StorageResponse> getLastWeekStorage(
            @Param("startDate") LocalDateTime startDate, @Param("endDate") LocalDateTime endtDate);

    Map<String, Object> getCurrentMonthStorages(@Param("startDate") LocalDate startDate, @Param("endDate") LocalDate endDate);

    String getCurrentMonthStorageInOperator(@Param("startDate") LocalDate startDate, @Param("endDate") LocalDate endDate);

    String getCurrentMonthStorageOutOperator(@Param("startDate") LocalDate startDate, @Param("endDate") LocalDate endDate);
}
